<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<!--
	Snapshot by 宝玉
-->
<html lang="zh-cn">
	<head>
		<title>版本/项目版本控制</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<!-- 引入 Bootstrap -->
		<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
	</head>
	<body style="background-color: #f6f6f6;">
	<div class="container">
		<div class="row" >
			<div class="col-xs-1 col-sm-3">
			</div>
			<div class="col-xs-10 col-sm-6">
				<div style="height: 30px;width: auto;background-color: black;margin-top: 15px;border-radius: 10px;">
					<span style="cursor: pointer;color: white;padding-top: 4px;padding-left: 5px;display: inline-block;" id="backTo">《 返回</span>
				</div>
				<div style="padding-left: 20px;">
					<h2>${project.proName}</h2>
					<span>项目经理：${project.proManager}</span><br/>
					<span>开发经理：${project.devManager}</span><br/>
					<span>当前版本：${project.currentVersion}</span><br/>
					<span>发布时间：${project.publishTime}</span><br/>
					<span>下一个版本：${project.nextVersion}</span><br/>
					<span>计划发布时间：${project.nextPublishTime}</span><br/>
					<c:forEach items="${versionList}" var="version">
						<h3>${version.version} <small><c:if test="${version.currVersion}">(当前版本)</c:if><c:if test="${version.nextVersion}">(计划版本)</c:if></small></h3>
						<h6>发布时间：${version.publishTime}</h6>
						${version.content}
					</c:forEach>
				</div>
			</div>
			<div class="col-xs-1 col-sm-3">
			</div>
		</div>
	</div>

		<!-- Scripts -->
			<script src="<c:url value="/templated/swab-man/assets/js/jquery.min.js"/>"></script>
			<script src="<c:url value="/templated/swab-man/assets/js/jquery.poptrox.min.js"/>"></script>
			<script src="<c:url value="/templated/swab-man/assets/js/jquery.scrolly.min.js"/>"></script>
			<script src="<c:url value="/templated/swab-man/assets/js/skel.min.js"/>"></script>
			<script src="<c:url value="/resources/lib/jquery/plugin/jquery.form.min.js"/>"></script>
			<script src="<c:url value="/resources/hplus/lib/js/plugins/toastr/toastr.min.js"/>"></script>
			<script src="<c:url value="/templated/swab-man/assets/js/util.js"/>"></script>
			<script src="<c:url value="/templated/swab-man/assets/js/main.js"/>"></script>
		<script>
			$(document).ready(function () {

				toastr.options = {
					"closeButton": true,  //是否显示关闭按钮
					"debug": false,   //是否使用debug模式
					"progressBar": true,
					"positionClass": "toast-top-right",  //弹出窗的位置
					"showDuration": "300",   //显示的动画时间
					"hideDuration": "500",  //消失的动画时间
					"timeOut": "5000",      //展现时间
					"extendedTimeOut": "1000",
					"showEasing": "swing",   //显示时的动画缓冲方式
					"hideEasing": "linear",  //消失时的动画缓冲方式
					"showMethod": "fadeIn",  //显示时的动画方式
					"hideMethod": "fadeOut"  //消失时的动画方式
				};

				$("#sendMeet").click(function () {

					var _name = $("#name").val();
					var _phone = $("#phone").val();
					var _address = $("#address").val();

					if($.trim(_name) === '') {
						toastr.warning("检测到姓名为空","消息提示");
						return;
					}
					if($.trim(_phone) === '' || !checkSubmitTel(_phone)) {
						toastr.warning("检测到手机号码为空或格式不对","消息提示");
						return;
					}
					if($.trim(_address) === '') {
						toastr.warning("检测到家庭地址为空","消息提示");
						return;
					}

					var options = {
						url: "<c:url value="/web/receiveMeet.json"/>",
						success: function (data) {
							if (data.status == 0) {
								toastr.success("您已经成功发出预约，稍后我们将与您联系！","消息提示");
							} else {
								toastr.error("发出预约时出错，请联系管理员，我们将及时做出处理！","错误提示");
							}
						}
					};
					$("#sendMeetForm").ajaxSubmit(options);
				});

				$("#backTo").click(function() {

					window.location.href = "<c:url value="/web/project.html"/>";
				});
			});

		</script>
	</body>
</html>